import { BasicColumn, FormSchema } from '@apps/antd-admin/src/components/Table';

export const columns: BasicColumn[] = [
  {
    title: '高铁名称',
    dataIndex: 'highSpeedTrainName',
    width: 120,
  },
  {
    title: '高铁电话',
    dataIndex: 'highSpeedTrainPhone',
    width: 100,
  },
  {
    title: '高铁排序',
    dataIndex: 'highSpeedTrainSort',
    width: 80,
  },
  {
    title: '高铁首字母',
    dataIndex: 'letter',
    width: 80,
  },
  {
    title: '百度城市编号',
    dataIndex: 'cityCode',
    width: 80,
  },
  {
    title: '区号',
    dataIndex: 'areaCode',
    width: 80,
  },
  {
    title: '高铁地址',
    dataIndex: 'highSpeedTrainAddress',
    width: 240,
  },
  {
    title: '创建时间',
    dataIndex: 'createTime',
    width: 150,
  },
];

export const searchFormSchema: FormSchema[] = [
  {
    field: 'highSpeedTrainName',
    label: '高铁名称',
    component: 'Input',
    colProps: { span: 5 },
  },
];

export const formSchema: FormSchema[] = [
  {
    label: '高铁Id',
    field: 'highSpeedTrainId',
    component: 'Input',
    required: false,
    show: false,
  },
  {
    label: '高铁名称',
    field: 'highSpeedTrainName',
    component: 'Input',
    required: true,
  },
  {
    label: '高铁电话',
    field: 'highSpeedTrainPhone',
    component: 'Input',
    required: true,
  },
  {
    label: '高铁排序',
    field: 'highSpeedTrainSort',
    component: 'InputNumber',
    required: true,
  },
  {
    label: '首字母',
    field: 'letter',
    component: 'Input',
    required: true,
  },
  {
    label: '城市编号',
    field: 'cityCode',
    component: 'Input',
    required: true,
  },
  {
    label: '区号',
    field: 'areaCode',
    component: 'Input',
    required: true,
  },
  {
    label: '高铁地址',
    field: 'highSpeedTrainAddress',
    component: 'InputTextArea',
    required: true,
    colProps: { span: 20 },
  },
];
